<?php
// +----------------------------------------------------------------------
// | ThinkCMF [ WE CAN DO IT MORE SIMPLE ]
// +----------------------------------------------------------------------
// | Copyright (c) 2013-2018 http://www.thinkcmf.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: 13哥 <yzb321055156@163.com>
// +----------------------------------------------------------------------
namespace app\api\model;
use think\Model;
class CommentModel extends Model
{
    public function getuserinfo()
    {
        return $this->hasOne('ImsMemberModel', 'id', 'user_id')->field('staff_name,staff_pic,id');
    }

    //获取点赞
    public function getuserlike()
    {
        return $this->hasMany('UserLikeModel', 'object_id', 'id')->where(['type_status' => 2, 'delete_time' => 0 ])->field('object_id,type_status,user_id');
    }

}